fn main() {
    // 默认情况下，Rust中的字符串都保证是UTF-8格式的，不能通过索引访问字符串
    let hello = String::from("Hello");

    // the trait `SliceIndex<str>` is not implemented for `{integer}`, which is required by `String: Index<_>`
    // you can use `.chars().nth()` or `.bytes().nth()`
    // let first_char = hello[0]; // 下标访问报错

    println!("{:?}", hello.chars().nth(0));
    println!("{:?}", hello.bytes().nth(0));
}